package com.shop.trade.api.api;

import com.shop.common.model.param.trade.ShoppingCartInput;
import com.shop.common.util.excption.UserNotFoundException;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年04月05日  17:34
 */
@RequestMapping("/trade")
public interface IShopCartApi {

    @PostMapping(value = "/shopCart")
    String addToShopCart(@RequestBody ShoppingCartInput shoppingCartInput, HttpServletRequest request) throws UserNotFoundException;

    @PutMapping(value = "/shopCart/itemNum")
    String modShopCartNum(@RequestBody ShoppingCartInput shoppingCartInput, HttpServletRequest request);

    @DeleteMapping(value = "/shopCart")
    String delShopCart(String id, HttpServletRequest request);

    @GetMapping(value = "/shopCarts")
    String qryShopCarts(ShoppingCartInput shoppingCartInput, String size, HttpServletRequest request) throws UserNotFoundException;

}
